package com.oceanread.cn.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.oceanread.cn.entity.Drillhole2;
import com.oceanread.cn.mapper.Drillhole2Mapper;
import com.oceanread.cn.service.IDrillhole2Service;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IDrillhole2ServiceImpl extends ServiceImpl<Drillhole2Mapper, Drillhole2> implements IDrillhole2Service {
    public List<Drillhole2> getall() {
        return baseMapper.getall();
    }

    public List<Drillhole2> query(String key, String value) {
        return baseMapper.query(key, value);
    }

    @Override
    public int insert(String PrjCode, String PrjID, Integer Order, String Altitude,
                      String Start, String Thickness, String Material, String MaterialO) {
        return baseMapper.insert(PrjCode, PrjID, Order, Altitude, Start, Thickness, Material, MaterialO);
    }
    @Override
    public Integer update(Drillhole2 drillhole2) {
        return baseMapper.update(drillhole2.getId(),drillhole2.getPrjCode(),drillhole2.getPrjID(),drillhole2.getOrder(),
                drillhole2.getAltitude(),drillhole2.getStart(),drillhole2.getThickness(),drillhole2.getMaterial(),drillhole2.getMaterial0()
        );
    }
    public Integer delete(int id) {
        return baseMapper.delete(id);
    }

    public List<Drillhole2> query1(String key, String value, int page, int size) {
        return baseMapper.query1((page-1)*size,size,key, value);
    }
    public List<Drillhole2> query2(String key, String value, String key2, String value2 ,int page, int size) {
        return baseMapper.query2((page-1)*size,size,key, value, key2, value2);
    }
    public List<Drillhole2> query2json(String key, String value, String key2, String value2) {
        return baseMapper.query2json(key, value, key2, value2);
    }

    @Override
    public Integer getnumquery(String key, String value) {
        return baseMapper.getnumquery(key, value);
    }
    public Integer getnumquery2(String key, String value, String key2, String value2) {
        return baseMapper.getnumquery2(key, value, key2, value2);
    }

}
